import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeContainer from './components/tabbars/HomeContainer.vue'
import MemberContainer from './components/tabbars/MemberContainer.vue'
import ShopcartContainer from './components/tabbars/ShopcartContainer.vue'
import SearchContainer from './components/tabbars/SearchContainer.vue'
import New from './components/new/new.vue'
import NewInfo from './components/new/newInfo.vue'
import Photo from './components/photos/photoList.vue'
import PhotoInfo from './components/photos/photoInfo.vue'
import GoodsList from './components/goods/goodsList.vue'
import GoodsInfo from './components/goods/goodsInfo.vue'
import GoodsDesc from './components/goods/goodsDesc.vue'
import GoodsComment from './components/goods/goodsComment.vue'


Vue.use(VueRouter)


const router=new VueRouter({
	routes:[
	    {
			path:'/',redirect:'home'
		},
		{
			path:'/home',component:HomeContainer
		},
		{
			path:'/search',component:SearchContainer
		},
		{
			path:'/shopcart',component:ShopcartContainer
		},
		{
			path:'/member',component:MemberContainer
		},
		{
			path:'/home/new',component:New
		},
		{
			path:'/home/newInfo/:id',component:NewInfo,props:true
		},
		{
			path:'/home/photolist',component:Photo
		},
		{
			path:'/home/photoInfo/:id',component:PhotoInfo,props:true
		},
		{
			path:'/home/goodsList',component:GoodsList
		},
		{
			path:'/home/goodsInfo/:id',component:GoodsInfo,props:true
		},
		{
			path:'/home/goodsDesc/:id',component:GoodsDesc,props:true
		},
		{
			path:'/home/goodsComment/:id',component:GoodsComment,props:true
		}
	],
	linkActiveClass:'mui-active'
})

export default router